<extend name="Public/base" />
<block name="content">
<script src="__JS__/jjhh.js?v={:C('TKE_VERSION')}"></script>
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 
			<a href="#" class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<button class="btn btn-info" id="add">新 增</button>
		<button class="confirm btn btn-danger ajax-post" url="{:U('changeStatusVillage?method=delete')}" target-form="ids">删 除</button>
		
		<div class="search-form fr cf row-fluid" style="width:800px;">
			<span class=" pull-right">
				<input type="text" name="search_text" class="search-input" value="{:htmlspecialchars(I('search_text'))}" placeholder="请输入小区名称" style="margin-bottom:0;"><button class="btn btn-info" id="search_button" url="{:U('Base/village')}"><i class="icon-search icon-white"></i></button>
			</span>
			<span class="control-group pull-right">
				<select data-default="0" required="required" name="ward_id" style="width:150px;" class="select-group" disabled  id="j-select-ward">
					<option value="0">请选择区</option>
				</select>
			</span>
			<span class="control-group pull-right">
				<select data-default="1" required="required" name="city_id" style="width:150px;" class="select-group" disabled  id="j-select-city">
					<option value="0">请选择城市</option>
				</select>
			</span>

			<span class="control-group pull-right">
	        	<select data-default="1" required="required" name="province_id" style="width:150px;" class="select-group" id="j-select-province">
					<option value="1">请选择省</option>
				</select>
			</span>
		</div>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content ">
					<notempty name="_list">
						<form id="export-form" method="post" action="" autocomplete="off">
							<table class="table table-bordered table-striped with-check">
								<thead>
									<tr>
										<th><input type="checkbox" /></th>
										<th nowrap="nowrap">序号</th>
										<th>城市</th>
										<th>行政区</th>
										<th>小区名</th>
										<th>入户时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="_list" id="vo">
										<tr>
											<td class="taskStatus"><input type="checkbox" value="{$vo.village_id}" name="id[]" class="ids"/></td>
											<td class="taskStatus">{$i}</td>
											<td class="taskStatus">{$vo.city_id|getCityName|strip_tags}</td>
											<td class="taskStatus">{$vo.ward_id|getWardName|strip_tags}</td>
											<td class="taskStatus">{$vo.village_name|htmlspecialchars|msubstr=###,0,40}</td>
											<td class="taskStatus">{$vo.into_time|time_format="Y-m-d"}</td>
											<td class="taskStatus">
												<a href="{:U('editVillage?village_id='.$vo['village_id'])}"><i class="icon-edit"></i> 编辑</a>
												<a href="{:U('changeStatusVillage',array('id'=>$vo['village_id'],'method'=>'delete'))}" class="ajax-get confirm"><i class="icon-remove"></i> 删除</a>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
								{$_page}
							</div>
						</form>
					<else/>
						<center>暂无内容</center>
					</notempty>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

$(function (){

    //省市区联动
    var url_area = {
    		"province" :"{:U('ServiceApi/getProvinceList', array('v'=> C('TKE_VERSION')))}",
            "city" :"{:U('ServiceApi/getProvinceCityList', array('v'=> C('TKE_VERSION')))}",
            "ward": "{:U('ServiceApi/getCityWard', array('v'=> C('TKE_VERSION')))}",
            "village": "{:U('ServiceApi/getWardVillage', array('v'=> C('TKE_VERSION')))}"
        }
    // 初始化select
    jjhh_select_area(url_area, 3);

	//新增跳转页面
	$('#add').click(function(){
		window.location.href="{:U('addVillage')}";
	});
});
//导航高亮
highlight_subnav("{:U('Base/village')}");
</script>
</block>